package com.smartum.mpr.model;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.smartum.mpr.json.serializers.CountySerializer;
import com.smartum.mpr.json.serializers.JobSubCategorySerializer;
import com.smartum.mpr.json.serializers.UserSerializer;

public class Job extends Identify {

	private static final long serialVersionUID = 1L;

	@JsonProperty("job_title")
	private String title;
	@JsonProperty("job_description")
	private String description;
	@JsonProperty("job_price")
	private Double price;
	@JsonProperty("job_timestamp")
	private Long timeStamp;
	@JsonProperty("job_phone_number")
	private String phoneNumber;
	@JsonSerialize(using = CountySerializer.class)
	@JsonProperty("job_location")
	private County county;
	@JsonProperty("job_category")
	@JsonSerialize(using = JobSubCategorySerializer.class)
	private JobSubCategory subCategory;
	@JsonProperty("job_email")
	private String email;
	@JsonProperty("user")
	private User owner;

	public Job() {

	}

	public JobSubCategory getSubCategory() {
		return subCategory;
	}

	public void setSubCategory(JobSubCategory subCategory) {
		this.subCategory = subCategory;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public County getCounty() {
		return county;
	}

	public void setCounty(County county) {
		this.county = county;
	}

	public User getOwner() {
		return owner;
	}

	public void setOwner(User owner) {
		this.owner = owner;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Long getTimeStamp() {
		return timeStamp;
	}

	public void setTimeStamp(Long timeStamp) {
		this.timeStamp = timeStamp;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	@Override
	@JsonProperty("job_id")
	public Long getId() {
		return super.getId();
	}

	@Override
	@JsonProperty("job_id")
	public void setId(Long id) {
		super.setId(id);
	}

}
